package com.vip.xchat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vip.xchat.model.Xsession;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface XSessionMapper extends BaseMapper<Xsession> {

    /**
     * 根据 userId 获取 session 会话列表
     * @param userId
     */
    List<Xsession> getSessionList(@Param("userId") String userId);

    /**
     * 根据 sessionId 获取 UserIds 值
     * @param sessionId
     */
    String getUserIdsBySessionId(@Param("sessionId") String sessionId);

}
